package wn.tcpip.socket.netty.business.factory;

import wn.tcpip.socket.netty.business.*;
import wn.tcpip.socket.spring.SpringUtil;

/**
 * Created by zhangqin on 2017/4/19.
 */
public  class  ResolverFactory {
    public final static String LOGIN_INFO = "01";//登录
    public final static String GPS_INFO= "12";//GPS 信息
    public final static String STATUS_INFO = "13";//状态信息
    public final static String STRING_INFO = "15";//字符串信息
    public final static String GPS_STATUS_MERGE__INFO = "16";//GPS、状态合并信息
    public static ResoverI makeResover(String cmd){
        switch (cmd){
            case LOGIN_INFO:
                return SpringUtil.getBean(LoginResoverImp.class);
            case GPS_INFO:
                return SpringUtil.getBean(GpsInfoResoverImp.class);
            case STATUS_INFO:
                return SpringUtil.getBean(StateResoverImp.class);
            case STRING_INFO:
                return SpringUtil.getBean(StringResoverImp.class);
            case GPS_STATUS_MERGE__INFO:
                return SpringUtil.getBean(GpsInfoAndStateResoverImp.class);
                default:
                    return null;
        }
    }
}
